#include <stdio.h>
#include <string.h>


int main( void )
{
	char a[] = "12345678";
	char temp1[128] = {0};	
	char *temp = temp1;
	int k = sizeof(a);
	int len = strlen(a);
	int i;

	printf("%s\n", a);
#if 0
	for(i=0;i<k/2;i++)

	{

		temp=a[i];

		a[i]=a[k-1-i];

		a[k-1-i]=temp;

	}
#else
	for ( i = len - 1; i >= 0; i-- ) {
		*temp = a[i];
		temp++;
	}
#endif

	printf("%s\n", temp);

	return 1;
}

//char *fun(char *str){    String s="";    int len = strlen(str);    for(int i=len-1;i>=0;i--)     s += str[i];    return s.c_str() ;}
